#ifndef MORPHOLOGYACTION_H
#define MORPHOLOGYACTION_H
#include "AbstractAction.h"
#include "Core.h"
#include "Work.h"
#include "exceptions.hpp"
#include "Ptr.hpp"
#include "Morphology.h"



using namespace std;
using namespace OOPUtils;



class MorphologyAction : public AbstractAction
{

  Q_OBJECT

public:

  MorphologyAction ();



  void setStructElem (const Core< int > & structElem);

  Core< int > & getStructElem ();

  const Core< int > & getStructElem () const;

  

  void setActionType (int t);



  virtual void updatePreview (QRect viewport);

  virtual void handleStartEvent ();

  virtual void rejectAction ();

  virtual void applyAction ();

private:

  Ptr< Morphology > _pMorphology;

  vector< Ptr< Morphology > > _morphologyPtrList;
  
  Core< int > _structElem;

  int _curMorphologyType;

};

#endif // MORPHOLOGYACTION_H
